<script setup lang="ts">
import { useMessage } from 'wot-design-uni'

function handleClickLeft() {
  uni.navigateBack()
}
const message = useMessage()
function handleClickStop() {
  message
    .confirm({
      msg: '暂停营业后，如果门店使用了扫码点餐、与点餐，暂停营业后，讲展示门店繁忙，并且用户将立即不能扫码下单，只能通过前台POS点餐。\n确定要暂停营业吗？',
      title: '暂停营业风险确认',
    })
    .then(() => {
      console.log('点击了确定按钮')
    })
    .catch(() => {
      console.log('点击了取消按钮')
    })
}
</script>

<template>
  <view class="h-full flex flex-col overflow-hidden">
    <wd-navbar
      title="门店档案"
      left-text="返回"
      right-text="暂停营业"
      left-arrow
      @click-right="handleClickStop"
      @click-left="handleClickLeft"
    />
    <scroll-view
      class="box-border flex-1 overflow-hidden p-[10px]"
      scroll-y
      :show-scrollbar="false"
    >
      <view class="mx-[10px]">
        <wd-text text="基础信息" bold size="16px" color="#333" />
      </view>
      <wd-cell title="营业结算时间" class="mt-3 rounded-lg" center value="0:00:00" is-link />
      <wd-cell class="mt-3 rounded-lg" center value="1003982">
        <template #title>
          <view class="flex items-center">
            <wd-text text="商户号" size="14px" color="#333" />
            <wd-tag type="primary" class="ml-1">门店</wd-tag>
          </view>
        </template>
      </wd-cell>
      <wd-cell title="门店名称" class="mt-3 rounded-lg" center value="乡村基（建设路店）" />
      <wd-cell title="所属品牌" class="mt-3 rounded-lg" center value="乡村基" />
      <wd-cell title="品类" class="mt-3 rounded-lg" center value="快餐" />
      <wd-cell title="城市-区域" class="mt-3 rounded-lg" center value="四川省-成都市-青羊区" />
      <wd-cell title="详细地址" class="mt-3 rounded-lg" center value="某某路某某号" />
      <wd-cell title="门店电话" class="mt-3 rounded-lg" center value="139****1234">
        <wd-text text="139****1234" color="#333">
          <template #suffix>
            <wd-icon name="view" size="14px" class="ml-1" />
          </template>
        </wd-text>
      </wd-cell>
      <wd-cell title="门店固定电话" class="mt-3 rounded-lg" center value="028-22993202" />
      <view class="mx-[10px] mt-4">
        <wd-text text="营业信息" bold size="16px" color="#333" />
      </view>
      <wd-cell title="餐厅logo图" class="mt-3 rounded-lg" center value="去上传" is-link />
      <wd-cell title="分时段设置" class="mt-3 rounded-lg" center>
        <wd-switch size="20px" />
      </wd-cell>
      <wd-cell title="营业时间" class="mt-3 rounded-lg" center is-link value="09:00-21:00" />
    </scroll-view>
    <view class="flex border-t-1 border-border border-t-solid bg-white p-4">
      <wd-button type="primary" :round="false" class="flex-1">保存</wd-button>
    </view>
  </view>
  <wd-message-box />
</template>

<style scoped lang="scss"></style>
